//
//@File    :	11.6_usetime1.cpp
//@Time    :	2021/08/29 09:12:07
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	using the second draft of the Time class
//

//complie usetime.cpp and mytime1.cpp together

#include <iostream>
#include "11.4_mytime1.h"

int main()
{
    using std::cout;
    using std::endl;
    Time planning;
    Time coding(2,40);
    Time fixing(5,55);
    Time total;

    cout<<"planning time = ";
    planning.Show();
    cout<<endl;

    cout<<"coding time = ";
    coding.Show();
    cout<<endl;

    cout<<"fixing time = ";
    fixing.Show();
    cout<<endl;

    total=coding+fixing;
    //operator notation
    cout<<"coding + fixing = ";
    total.Show();
    cout<<endl;      

    Time morefixing(3,28);
    cout<<"more fixing time = ";
    morefixing.Show();
    cout<<endl;
    total = morefixing.operator+(total);
    //function notation
    cout<<"morefixing.operator+(total) = ";
    total.Show();
    cout<<endl;
    system("pause");
    return 0;
}